<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>位偏移</title>
    <link rel="stylesheet" href="./bootstrap-3.4.1-dist/css/bootstrap.min.css">
    <style>
        .container{
         background-color: rgb(221, 187, 187);
        }
        .row>div{
         height: 30px;
         background-color: rgb(228, 99, 99);
        }
        .row>div:nth-child(2n){
         background-color: rgb(20, 202, 102);
        }
    </style>
</head>
<body>
    <!-- col-lg-offset-2 向右偏移2份 -->
    <div class="container">
        <!-- 第一行 -->
        <div class="row">
            <div class="col-lg-2">1</div>
            <div class="col-lg-2 col-lg-offset-2">2</div>
            <div class="col-lg-2">3</div>
            <div class="col-lg-2">4</div>
        </div>
        <!-- 第二行 -->
        <div class="row">
            <div class="col-lg-2 col-lg-offset-2">1</div>
            <div class="col-lg-2 ">2</div>
            <div class="col-lg-2">3</div>
            <div class="col-lg-2">4</div>
        </div>
        <!-- 第三行 -->
        <div class="row">
            <div class="col-lg-2 col-lg-offset-4">1</div>
            <div class="col-lg-2 ">2</div>
            <div class="col-lg-2">3</div>
            <div class="col-lg-2">4</div>
        </div>
    </div>
</body>
</html>